<?php
require_once dirname(__FILE__).'/../bootstrap/unit.php';
$t = new lime_test(3, new lime_output_color());

$fn = '::second()';
$t->comment($fn);
$t->is(Zenino_Interval_Toolkit::second('F#', 'D'), 'G', $fn.'returns diatonic second');
try
{
  Zenino_Interval_Toolkit::second('H', 'C');
  $t->fail('no code should be executed after throwing an exception');
}
catch (NoteFormatError $e)
{
  $t->pass($fn.' throws a NoteFormatError exception when $note is not a valid note');
}

$fn = '::measure()';
$t->comment($fn);
$t->is(Zenino_Interval_Toolkit::measure('F#', 'D'), 8, $fn.' finds 8 half-steps between F# and D');